<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<h:outputStylesheet library="css" name="style.css" />
	<title>SGC Web</title>
</h:head>
<h:body>
	<!-- 	<h:graphicImage url="/resources/images/Logo_small.jpg"></h:graphicImage> -->
	<h:panelGrid columns="3">
		<h:outputLabel styleClass="title" value="SGC Web" />
		<h:outputLabel styleClass="title" value="-" />
		<h:outputLabel styleClass="title"
			value="#{checkUserBean.usuario.company}" />
	</h:panelGrid>
	<h:panelGroup styleClass="alignmentRight">
		<h:panelGrid columns="2" columnsClasses="alignmentRight" border="0">
			<h:outputLabel value="Usuario:" />
			<h:outputText value="#{checkUserBean.usuario.descrip}" />
		</h:panelGrid>
	</h:panelGroup>
	<p:spacer height="10" />
	<h:form>
				<p:panel header="Imprimir Ordenes de Compra">

			<p:dataTable var="c" value="#{purchaseOrderListBean.headers}"
				widgetVar="headerTable"
				emptyMessage="No se han seleccionado registros" paginator="true"
				rows="10"
				paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
				rowsPerPageTemplate="5,10,15" id="headerTab">
				<p:column id="req_no" headerText="Order. Nro." sortBy="por_no">
					<h:outputText value="#{c.por_no}" />
				</p:column>
				<p:column id="fec_por" sortBy="fec_por" headerText="Fec. Sol.">
					<h:outputText value="#{c.fec_por}" />
				</p:column>
				<p:column id="fec_req" sortBy="fec_req" headerText="Fec. Req.">
					<h:outputText value="#{c.fec_req}" />
				</p:column>
				<p:column id="solicitante" sortBy="solicitante"
					headerText="Solicitante">
					<h:outputText value="#{c.solicitante_name}" />
				</p:column>
				<p:column id="suplier" sortBy="suplier" headerText="Proveedor">
					<h:outputText value="#{c.suplier_name}" />
				</p:column>
				<p:column id="Detalle" headerText="Detalle">
					<h:outputText value="#{c.por_deta}" />
				</p:column>
				<p:column>
					<p:commandButton id="selectButton" icon="ui-icon-print"
						title="Print" action="#{purchaseOrderListBean.print()}">
						<f:setPropertyActionListener value="#{c}"
							target="#{purchaseOrderListBean.header}" />
					</p:commandButton>
				</p:column>
			</p:dataTable>
		</p:panel>
		<p:spacer height="50" width="5" />
		<p:splitButton value="Inicio" url="navegacion.xhtml"
			actionListener="#{purchaseOrderListBean.inicio}" update="msgs"
			icon="ui-icon-disk">
			<p:separator />
			<p:menuitem value="Salir" url="index.xhtml" icon=".ui-icon-power"
				actionListener="#{checkUserBean.logout}" />
		</p:splitButton>
		<h:panelGrid columns="1">
			<p:messages id="msgs" />
		</h:panelGrid>
	</h:form>
</h:body>
</html>